<template>
<div>
  <van-row>
    <van-nav-bar
        title="标题"
        left-text="返回"
        right-text="按钮"
        left-arrow
        @click-left="onClickLeft"
        @click-right="onClickRight"
    >
      <template #right>
        <van-button type="primary">主要按钮</van-button>
      </template>
    </van-nav-bar>
  </van-row>
  <van-cell is-link @click="showPopup">展示弹出层</van-cell>
  <van-popup v-model="show">内容</van-popup>
</div>
</template>

<script>
import { Toast } from 'vant';
export default {
  name: "index",
  data() {
    return {
      show: false,
    };
  },

  methods: {
    showPopup() {
      this.show = true;
    },
    onClickLeft() {
      Toast('返回');
    },
    onClickRight() {
      Toast('按钮');
    },
  },
}
</script>

<style scoped>

</style>
